package Logic;

import java.io.Serializable;

public class MoveResults implements Serializable {
	private MoveResultsType type;
	private Integer x1,y1,x2,y2;
	private Square soldier1, soldier2;
	
	public MoveResults(MoveResultsType type, Integer x1, Integer y1,
			Integer x2, Integer y2) {
		super();
		this.type = type;
		this.x1 = x1;
		this.y1 = y1;
		this.x2 = x2;
		this.y2 = y2;
	}

	public Integer getX1() {
		return x1;
	}

	public Integer getY1() {
		return y1;
	}

	public Integer getX2() {
		return x2;
	}

	public Integer getY2() {
		return y2;
	}

	public MoveResultsType getType() {
		return type;
	}

	public void setType(MoveResultsType type) {
		this.type = type;
	}

	public enum MoveResultsType {
        move,
        win,
        lose, 
        tie;
    }

	@Override
	public String toString() {
		return "(" + x1 + "," + y1 + ")->(" + x2 + "," + y2 + ") " + soldier1 + ", " + soldier2 + " = " + getType().toString();
	}	
	
	public Square getSoldier1() {
		return soldier1;
	}

	public Square getSoldier2() {
		return soldier2;
	}

	public void setSoldiers(Square soldier1, Square soldier2) {
		setSoldier(soldier1);
		this.soldier2 = soldier2;
		
	}
	
	public void setSoldier(Square soldier1) {
		this.soldier1 = soldier1;
	}	
}